<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>权限树</title>
    <link rel="stylesheet" type="text/css" href="layui/css/layui.css" th:href="@{/static/layui/css/layui.css}">
    <link href="static/css/public.css" th:href="@{/static/css/public.css}" media="all" type="text/css" rel="stylesheet"/>
</head>
<body class="childrenBody">
<fieldset class="layui-elem-field layui-field-title"><legend>权限树</legend></fieldset>
<!-- 此扩展能递归渲染一个权限树，点击深层次节点，父级节点中没有被选中的节点会被自动选中，单独点击父节点，子节点会全部 选中/去选中 -->
<form class="layui-form" action="#">
    <div class="layui-form-item">
        <label class="layui-form-label">角色名称</label>
        <div class="layui-input-inline">
            <input class="roleId" type="hidden" name="roleId" />
            <input class="layui-input layui-disabled roleName" type="text" name="roleName" disabled/>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">选择权限</label>
        <div class="layui-input-block">
            <div id="LAY-auth-tree-index"></div>
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <div class="layui-input-block">
            <button class="layui-btn" type="submit" lay-submit lay-filter="LAY-auth-tree-submit">提交</button>
            <button class="layui-btn layui-btn-primary cancel_btn" type="button">取消</button>
        </div>
    </div>
</form>
</body>
<script type="text/javascript" src="layui/layui.js" th:src="@{/static/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/static/js/authTree.js}"></script>
</html>